// 用户相关的 API 接口

// 导入 request 模块，发起请求
import request from '@/utils/request.js'

// 封装一个获取用户基本信息的 API 接口
export const getUserAPI = (token) => {
  return request.get('/my/userinfo')
}
export const getMenusAPI = (token) => {
  return request.get('/my/menus')
}
export const updateUserAPI = (obj) => {
  return request.put('/my/userinfo', obj)
}
export const updataAvatarAPI = (avatar) => {
  return request.patch('/my/update/avatar', { avatar })
}
export const updatePwdAPI = (obj) => {
  return request.patch('/my/updatepwd', obj)
}
